﻿using Admin.NET.Core;
using System.ComponentModel.DataAnnotations;

namespace Admin.NET.Application;

    /// <summary>
    /// 选课任务基础输入参数
    /// </summary>
    public class XuankeTaskBaseInput
    {
        /// <summary>
        /// 选课任务名称
        /// </summary>
        public virtual string Name { get; set; }
        
        /// <summary>
        /// 开始时间
        /// </summary>
        public virtual DateTime StartTime { get; set; }
        
        /// <summary>
        /// 结束时间
        /// </summary>
        public virtual DateTime EndTime { get; set; }
        
        /// <summary>
        /// 启用
        /// </summary>
        public virtual bool Active { get; set; }
        
        /// <summary>
        /// 级
        /// </summary>
        public virtual int Ji { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        public virtual string Status { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public virtual string? Remark { get; set; }
        
        /// <summary>
        /// 创建者姓名
        /// </summary>
        public virtual string? CreateUserName { get; set; }
        
        /// <summary>
        /// 修改者姓名
        /// </summary>
        public virtual string? UpdateUserName { get; set; }
        
    }

    /// <summary>
    /// 选课任务分页查询输入参数
    /// </summary>
    public class XuankeTaskInput : BasePageInput
    {
        /// <summary>
        /// 关键字查询
        /// </summary>
        public string? SearchKey { get; set; }

        /// <summary>
        /// 选课任务名称
        /// </summary>
        public string? Name { get; set; }
        
        /// <summary>
        /// 开始时间
        /// </summary>
        public DateTime? StartTime { get; set; }
        
        /// <summary>
         /// 开始时间范围
         /// </summary>
         public List<DateTime?> StartTimeRange { get; set; } 
        /// <summary>
        /// 结束时间
        /// </summary>
        public DateTime? EndTime { get; set; }
        
        /// <summary>
         /// 结束时间范围
         /// </summary>
         public List<DateTime?> EndTimeRange { get; set; } 
        /// <summary>
        /// 启用
        /// </summary>
        public int? Active { get; set; }
        
        /// <summary>
        /// 级
        /// </summary>
        public int? Ji { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        public string? Status { get; set; }
        
        /// <summary>
        /// 备注
        /// </summary>
        public string? Remark { get; set; }
        
    }

    /// <summary>
    /// 选课任务增加输入参数
    /// </summary>
    public class AddXuankeTaskInput : XuankeTaskBaseInput
    {
        /// <summary>
        /// 选课任务名称
        /// </summary>
        [Required(ErrorMessage = "选课任务名称不能为空")]
        public override string Name { get; set; }
        
        /// <summary>
        /// 开始时间
        /// </summary>
        [Required(ErrorMessage = "开始时间不能为空")]
        public override DateTime StartTime { get; set; }
        
        /// <summary>
        /// 结束时间
        /// </summary>
        [Required(ErrorMessage = "结束时间不能为空")]
        public override DateTime EndTime { get; set; }
        
        /// <summary>
        /// 启用
        /// </summary>
        [Required(ErrorMessage = "启用不能为空")]
        public override bool Active { get; set; }
        
        /// <summary>
        /// 级
        /// </summary>
        [Required(ErrorMessage = "级不能为空")]
        public override int Ji { get; set; }
        
        /// <summary>
        /// 状态
        /// </summary>
        [Required(ErrorMessage = "状态不能为空")]
        public override string Status { get; set; }
        
    }

    /// <summary>
    /// 选课任务删除输入参数
    /// </summary>
    public class DeleteXuankeTaskInput : BaseIdInput
    {
    }

    /// <summary>
    /// 选课任务更新输入参数
    /// </summary>
    public class UpdateXuankeTaskInput : XuankeTaskBaseInput
    {
        /// <summary>
        /// 主键Id
        /// </summary>
        [Required(ErrorMessage = "主键Id不能为空")]
        public long Id { get; set; }
        
    }

    /// <summary>
    /// 选课任务主键查询输入参数
    /// </summary>
    public class QueryByIdXuankeTaskInput : DeleteXuankeTaskInput
    {

    }

/// <summary>
/// 选课任务更新输入参数
/// </summary>
public class ImportXuankeTaskInput
{
    /// <summary>
    /// 选课任务Id
    /// </summary>
    [Required(ErrorMessage = "选课任务Id不能为空")]
    public long XuankeTaskId { get; set; }

    /// <summary>
    /// 文件Id
    /// </summary>
    [Required(ErrorMessage = "文件Id不能为空")]
    public long FileId { get; set; }
}
